<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>选择器</title>
    <style>
      /* 1.标签选择器 */
      div {
        color: red;
      }
      /* 2.类选择器 */
      .box1 {
        font-size: 40px;
        color: blueviolet;
      }
      .box2 {
        background-color: black;
      }
      /* 3.后代选择器 */
      .box3 p {
        color: mediumaquamarine;
      }
    </style>
  </head>
  <body>
    <div class="box1 box2">今天天气很好呀哈哈哈</div>
    <p>明天天气很好的呀嘻嘻嘻</p>
    <div>后天天气很好啊嘿嘿嘿</div>
    <div class="box3">
      <div>
        <p>我是后代选择器</p>
      </div>
    </div>
  </body>
</html>
